<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>《大宅门云诊所系统》安装程序</title>
    <script type="text/javascript" src="../his/vendor/jquery/jquery.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../his/vendor/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="../his/vendor/bootstrap/css/bootstrap-theme.min.css">
    <link rel="stylesheet" type="text/css" href="../his/vendor/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="./css/pub.css">
    <script type="text/javascript" src="../his/vendor/bootstrap/js/bootstrap.min.js"></script>
    <!--[if lt IE 9]>
    <script type="text/javascript" src="./js/html5shiv.min.js"></script>
    <script type="text/javascript" src="./js/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" href="./css/install.css">
    <style>
        #out th{
            width: 25%;
        }
        #out td{
            text-align: center;
        }

        #out .tl{text-align: left;}
    </style>
<script>
function testClick(){
    if($('.yes').length!=7){
        alert('您的配置或权限不符合要求');
    }else{
        location.href='./index.php?c=create';
    }
}
</script>
</head>
<body>
<div id="nav">
    <div class="inside">
        <p class="name">《大宅门云诊所系统》<span>安装向导</span></p>
        <ul class="schedule">
            <li class="number">1</li>
            <li class="word">使用协议</li>
        </ul>
        <ul class="schedule active">
            <li class="number">2</li>
            <li class="word">环境检测</li>
        </ul>
        <ul class="schedule">
            <li class="number">3</li>
            <li class="word">创建数据</li>
        </ul>
        <ul class="schedule">
            <li class="number">4</li>
            <li class="word">安装完成</li>
        </ul>
    </div>
</div>
<div id="out">
    <div class="inside">
        <div class="box test">
            <h2>环境监测</h2>
            <table class="table table-border">
                <tr>
                    <th width="25%">坏境</th>
                    <th width="25%">最低配置</th>
                    <th width="25%">当前配置</th>
                    <th width="25%">是否符合</th>
                </tr>
                <tr>
                    <td>操作系统</td>
                    <td>不限</td>
                    <td><?php echo php_uname('s'); ?></td>
                    <td class="yes">√</td>
                </tr>
                <tr>
                    <td>php版本</td>
                    <td>&gt;5.5</td>
                    <td><?php echo PHP_VERSION ?></td>
                    <?php $php_version=explode('.', PHP_VERSION); ?>
                    <td class="<?php if(($php_version['0']>=7) || ($php_version['0']>=5 && $php_version['1']>=5))echo 'yes'; ?>">
                        <?php if (($php_version['0']>=7) || ($php_version['0']>=5 && $php_version['1']>=5)): ?>
                            √
                        <?php else: ?>
                        <span style="color: red" >×</span>
                        <?php endif ?>
                    </td>
                </tr>
                <tr>
                    <td>mysql版本</td>
                    <td>&gt;5.1</td>
                    <td><?php echo extension_loaded('mysql')?'mysql':'mysqli'; ?></td>
                    <td class="<?php if(extension_loaded('mysql') || extension_loaded('mysqli'))echo 'yes'; ?>">
                        <?php if (extension_loaded('mysql') || extension_loaded('mysqli')): ?>
                            √
                        <?php else: ?>
                        <span style="color: red" >×</span>
                        <?php endif ?>
                    </td>
                </tr>
            </table>
            <h2>目录权限</h2>
            <table class="table table-border">
                <tr>
                    <th width="25%">环 境</th>
                    <th width="25%">最低配置</th>
                    <th width="25%">当前配置</th>
                    <th width="25%">是否符合</th>
                </tr>
                <tr>
                    <td class="tl">./</td>
                    <td>可写</td>
                    <td>
                        <?php if (is_writable('../../')): ?>
                            可写
                        <?php else: ?>
                            不可写
                        <?php endif ?>
                    </td>
                    <td class="<?php if(is_writable('../../'))echo 'yes'; ?>">
                        <?php if (is_writable('../../')): ?>
                            √
                        <?php else: ?>
                        <span style="color: red" >×</span>
                        <?php endif ?>
                    </td>
                </tr>
                <tr>
                    <td class="tl">./Upload</td>
                    <td>可写</td>
                    <td>
                        <?php if (is_writable('../../Upload')): ?>
                            可写
                        <?php else: ?>
                            不可写
                        <?php endif ?>
                    </td>
                    <td class="<?php if(is_writable('../../Upload'))echo 'yes'; ?>">
                        <?php if (is_writable('../../Upload')): ?>
                            √
                        <?php else: ?>
                        <span style="color: red" >×</span>
                        <?php endif ?>
                    </td>
                </tr>
                <tr>
                    <td class="tl">./Application/Runtime</td>
                    <td>可写</td>
                    <td>
                        <?php if (is_writable('../../Application/Runtime')): ?>
                            可写
                        <?php else: ?>
                            不可写
                        <?php endif ?>
                    </td>
                    <td class="<?php if(is_writable('../../Runtime'))echo 'yes'; ?>">
                        <?php if (is_writable('../../Application/Runtime')): ?>
                            √
                        <?php else: ?>
                        <span style="color: red" >×</span>
                        <?php endif ?>
                    </td>
                </tr>
                <tr>
                    <td class="tl">./Public/install</td>
                    <td>可写</td>
                    <td>
                        <?php if (is_writable('../../Public/install')): ?>
                            可写
                        <?php else: ?>
                            不可写
                        <?php endif ?>
                    </td>
                    <td class="<?php if(is_writable('../../Public/install'))echo 'yes'; ?>">
                        <?php if (is_writable('../../Public/install')): ?>
                            √
                        <?php else: ?>
                        <span style="color: red" >×</span>
                        <?php endif ?>
                    </td>
                </tr>
                <tr>
                    <td class="tl">./Application/Common/Conf</td>
                    <td>可写</td>
                    <td>
                        <?php if (is_writable('../../Application/Common/Conf')): ?>
                            可写
                        <?php else: ?>
                            不可写
                        <?php endif ?>
                    </td>
                    <td class="<?php if(is_writable('../../Application/Common/Conf'))echo 'yes'; ?>">
                        <?php if (is_writable('../../Application/Common/Conf')): ?>
                            √
                        <?php else: ?>
                        <span style="color: red" >×</span>
                        <?php endif ?>
                    </td>
                </tr>
            </table>
            <p class="agree">
                <a class="btn btn-primary" href="./index.php?c=agreement">上一步</a>
                <a class="btn btn-success" href="javascript:;" onclick="testClick()">下一步</a>
            </p>
        </div>
    </div>
</div>

</body>
</html>
